<?php //strip
/**
 * Database model for playgrounds table.
 *
 * @package odReservationsWpPlugin
 * @subpackage odReservationsWpPlugin_Models
 * @author Ondrej Donek <ondrejd@gmail.com>
 */
class odReservationsWpPlugin_Models_Playground extends odWpPlugin_Model_WithTrash
{
	public function __construct()
	{
		global $wpdb;
    
    parent::__construct(array(
      'tableName' => $wpdb->prefix . 'reservations_playgrounds',
      'primaryColumn' => 'ID',
      'checkColumn' => 'title',
      'columns' => array(
        'ID' => array('type' => 'bigint', 'length' => 20, 'primary' => true),
        'title' => array('type' => 'char', 'length' => 75, 'notnull' => true),
        'description' => array('type' => 'text', 'notnull' => true, 'default' => ''),
        'max_players' => array('type' => 'tinyint', 'length' => 2, 'notnull' => true, 'default' => 4, 'comment' => 'Maximum players who can play at the playground at once.'),
        'hours_per_game' => array('type' => 'tinyint', 'length' => 2, 'notnull' => true, 'default' => 5),
        'start_times' => array('type' => 'text', 'notnull' => true, 'default' => 'a:14:{i:8;b:1;i:9;b:1;i:10;b:1;i:11;b:1;i:12;b:1;i:13;b:1;i:14;b:1;i:15;b:1;i:16;b:1;i:17;b:1;i:18;b:1;i:19;b:1;i:20;b:1;i:21;b:1;}')
      )
    ));
	}
	
}
